package tbrefund

import (
	"sync"
)

// TmallDisputeReceiveGetResultSet 结构体
type TmallDisputeReceiveGetResultSet struct {
	// results
	Results []Dispute `json:"results,omitempty" xml:"results>dispute,omitempty"`
	// 错误码
	ErrorCode string `json:"error_code,omitempty" xml:"error_code,omitempty"`
	// 错误信息
	ErrorMsg string `json:"error_msg,omitempty" xml:"error_msg,omitempty"`
	// 当前页面的纠纷单数量
	PageResults int64 `json:"page_results,omitempty" xml:"page_results,omitempty"`
	// 所有符合查询条件的纠纷单数量
	TotalResults int64 `json:"total_results,omitempty" xml:"total_results,omitempty"`
	// 是否还有下一页
	HasNext bool `json:"has_next,omitempty" xml:"has_next,omitempty"`
}

var poolTmallDisputeReceiveGetResultSet = sync.Pool{
	New: func() any {
		return new(TmallDisputeReceiveGetResultSet)
	},
}

// GetTmallDisputeReceiveGetResultSet() 从对象池中获取TmallDisputeReceiveGetResultSet
func GetTmallDisputeReceiveGetResultSet() *TmallDisputeReceiveGetResultSet {
	return poolTmallDisputeReceiveGetResultSet.Get().(*TmallDisputeReceiveGetResultSet)
}

// ReleaseTmallDisputeReceiveGetResultSet 释放TmallDisputeReceiveGetResultSet
func ReleaseTmallDisputeReceiveGetResultSet(v *TmallDisputeReceiveGetResultSet) {
	v.Results = v.Results[:0]
	v.ErrorCode = ""
	v.ErrorMsg = ""
	v.PageResults = 0
	v.TotalResults = 0
	v.HasNext = false
	poolTmallDisputeReceiveGetResultSet.Put(v)
}
